/*
 * DrawLib.h
 *
 *  Created on: 2010-3-10
 *      Author: Administrator
 */

#ifndef DRAWLIB_H_
#define DRAWLIB_H_

#include <gdi.h>
#include <e32cmn.h>

class DrawLib
	{
public:
	DrawLib();
	virtual ~DrawLib();
	
private:
	static void DrawLib::WrapTextL(const TDesC& aSource, 
								TInt aFirstLineWidth, 
								TInt aOtherLineWidth, 
								const CFont& aFont, 
								CArrayFix<TPtrC>& aWrappedArray);
	
public:
	static CFont* UseFontL(CGraphicsContext* aGC,
						const TDesC& aFontFamily,
						TBool bBold,
						TBool bItalics,
						TBool bUndelineStyle,
						TBool bStrikethroughStyle,
						TRgb  aColor,
						const TDesC& aFontSize);
	
	static void DiscardFont(CGraphicsContext* aGC);
	
	static void DrawText(CGraphicsContext* aGC,const TDesC& aDes,const TPoint& aPoint);
	static void DrawText(CGraphicsContext* aGC,
						const TDesC& aDes,
						const TRect& aBox,
						TInt aBaselineOffset,
						CGraphicsContext::TTextAlign aAlignment=CGraphicsContext::ELeft, 
						TInt aLeftMargin=0,
						const CFont* aFont = NULL,
						TBool bNeedWrap = EFalse);
	static void DrawPrettyText(CGraphicsContext* aGC,const TDesC& aDes,
								const TRect& aBox,
								TInt aBaselineOffset,
								CGraphicsContext::TTextAlign aAlignment=CGraphicsContext::ELeft, 
								TInt aLeftMargin=0);
	
public:
	static void DrawLine(CGraphicsContext& aGc,TSize& size,TRgb& color,CGraphicsContext::TPenStyle style,TPoint& ptStart,TPoint& ptEnd);
	};

#endif /* DRAWLIB_H_ */
